@import "console.dynamic.less";

fieldset {
  margin: 0 0 10px 0;
  border: 1px solid @borderColor;
  padding: 10px 20px 5px 20px;
  background: #fff;
  border-radius: @borderRadius;

  legend {
    color: #666;
    padding: 0 10px;
    font-size: 13px;
  }
}

.layui-tab, .layui-card {
  overflow: hidden;
  border-radius: @borderRadius;
}

.layui-tab {
  > .layui-tab-content {
    padding: 20px;
    background: #fff;
  }
}

.layui-card {
  > .layui-card-header {
    padding: 0 20px;
  }

  > .layui-card-body {
    padding: 20px;
  }
}

.layui-code {
  border-radius: @borderRadius;
}

.layui-btn {
  border: 1px solid #009688;

  &-warm {
    border: 1px solid #FFB800;
  }

  &-danger {
    border: 1px solid #FF5722;
  }

  &-normal {
    border: 1px solid #1E9FFF;
  }

  &-disabled {
    border: 1px solid @borderColor;
  }

  &-group {
    border: 1px solid #098;
    overflow: hidden;
    background: #009688;
    line-height: 28px;
    border-radius: 2px;

    + .layui-btn {
      margin-left: 8px;
    }

    .layui-btn {
      height: 28px;
      line-height: 28px;
      border-width: 0 !important;
      border-radius: 0 !important;

      + .layui-btn {
        margin-left: 1px !important;
      }

      &-primary:hover {
        border-color: #009688;
      }
    }
  }

  .layui-icon {
    float: left;
    margin-right: 5px;
  }

  & + .layui-btn {
    margin-left: 8px;
  }
}

.layui-badge {
  margin-right: 5px;

  &-middle {
    width: 1em;
    height: auto;
    padding: 5px;
    white-space: normal;
    vertical-align: middle;
  }
}

/*! 搜索表单样式 */
.form-search {
  .layui-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 32px;

    .layui-icon {
      font-size: 15px
    }
  }

  .layui-form-label {
    width: auto !important;
    height: 32px;
    padding: 0 8px;
    line-height: 32px
  }

  .layui-input-inline {
    width: 170px;

    input, select {
      width: 100%;
      height: 32px;
      padding: 0 8px;
      line-height: 32px
    }
  }

  .layui-form-select dl {
    top: 31px;
    padding: 0
  }
}

/* 表单验证异常提示 */
.label-required {
  &-prev:before {
    width: 1em;
    color: red;
    content: '*';
    display: inline-block;
    position: absolute;
    text-align: left;
    font-weight: 700;
    line-height: 1.6em;
    margin-left: -0.8em;
  }

  &:after, &-next:after {
    top: 6px;
    right: 5px;
    color: red;
    content: '*';
    position: absolute;
    margin-left: 4px;
    font-weight: 700;
    line-height: 1.8em
  }

  &-null:before {
    content: none !important
  }
}

.layui-input, .layui-select {
  line-height: 38px
}

.layui-form-checkbox.layui-form-checked {
  i {
    border-color: #5FB878;
  }
}

label.think-radio, label.think-checkbox {
  cursor: pointer;
  margin-right: 10px;
  display: inline-block;
}

.think-radio, .think-checkbox {
  margin-top: 10px;
  font-weight: 400;
  line-height: 18px;

  input[type=radio], input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 1px solid @borderColor;
    position: relative;
    background: #fff;
    margin-right: 5px;
    vertical-align: bottom;
    display: inline-block !important;
    box-sizing: border-box !important;
    appearance: none;
    -webkit-appearance: none;

    &:checked {
      border-color: #009688;

      &:after {
        display: block;
        position: relative;
        animation-duration: .3s;
        -webkit-animation-duration: .3s;
        animation-fill-mode: both;
        -webkit-animation-fill-mode: both;
        animation-name: layui-scale-spring;
        -webkit-animation-name: layui-scale-spring;
      }
    }
  }

  input[type=radio] {
    border-radius: 1em;

    &:checked:after {
      top: 4px;
      left: 4px;
      width: 8px;
      height: 8px;
      cursor: pointer;
      content: '';
      background: #009688;
      border-radius: 1em;
    }
  }

  input[type=checkbox] {
    border-radius: 1px;

    &:checked:after {
      color: #009688;
      cursor: pointer;
      padding: 2px;
      content: "\e605";
      font-size: 12px;
      font-style: normal;
      font-weight: 700;
      font-family: layui-icon !important;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale
    }
  }
}

.layui-table {
  td, th {
    font-size: 12px;
  }

  div.headimg {
    width: 35px;
    height: 35px;
    border: 1px solid @borderColor;
    display: inline-block;
    overflow: hidden;
    text-align: center;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: @minShadow;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;

    > img {
      width: 110%;
      height: 110%;
      max-width: 110%;
      max-height: 110%;
      margin: -5% 0 0 -5%;
    }

    & + * {
      vertical-align: middle;
    }
  }

  .list-table-sort-td {
    width: 10px !important;
    text-align: center !important;
    padding-left: 5px !important;
    padding-right: 5px !important;

    button {
      width: 56px;
      background: #009688
    }

    input {
      width: 50px;
      color: #666;
      padding: 2px;
      font-size: 9pt;
      border: 1px solid @borderColor;
      text-align: center;
      line-height: 18px
    }
  }

  .list-table-check-td {
    width: 10px !important;
    text-align: center !important;
    padding-left: 15px !important;
    padding-right: 15px !important;

    input {
      margin: 0 !important;
      vertical-align: middle
    }
  }
}

.layui-layer-content {
  .layui-form.layui-card {
    margin: 0;

    .layui-card-body {
      padding: 20px 40px 0 0;
    }
  }
}

.layui-layer-dialog {
  .layui-layer-content {
    .layui-layer-ico {
      top: 50% !important;
      margin-top: -15px !important
    }
  }
}

.laydate-footer-btns {
  span {
    line-height: 24px !important
  }
}

.layui-tags {
  display: flex;
  flex-wrap: wrap;
  vertical-align: middle;

  .layui-tag {
    color: #FFF;
    height: 38px;
    margin: 3px 4px 3px 0;
    padding: 0 4px 0 10px;
    display: inline-block;
    font-size: 14px;
    line-height: 38px;
    border-radius: 2px;
    white-space: nowrap;
    background: #1E9FFF !important;
    user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;

    .layui-icon {
      font-size: 14px;
      font-weight: 700;
      margin-left: 5px;

      &:hover {
        cursor: pointer;
        color: #FF5722;
      }
    }

    &-input {
      width: 100px;
      resize: none;
      margin: 3px 8px 3px 0;
      overflow: hidden;
      white-space: nowrap;
    }
  }
}
